Expand description

Procedural macros used by ruma crates.

See the documentation for the individual macros for usage details.

Macros

Compile-time checked DeviceKeyId construction.
Generates an enum to represent the various Matrix event types.
Compile-time checked EventId construction.
Compile-time checked MxcUri construction.
Compile-time checked RoomAliasId construction.
Compile-time checked RoomId construction.
Compile-time checked RoomVersionId construction.
⚠ If this is the only documentation you see, please navigate to the docs for ruma_common::api::ruma_api, where actual documentation can be found.
Compile-time checked ServerName construction.
Compile-time checked ServerSigningKeyId construction.
Compile-time checked UserId construction.

Derive Macros

Derive the AsRef<str> trait for an enum.
Derive the as_str() method using the AsRef<str> implementation of the type.
Derive the Deserialize trait using the From<Cow<str>> implementation of the type.
Derive the fmt::Display trait using the AsRef<str> implementation of the type.
Generates implementations needed to serialize and deserialize Matrix events.
Generates an implementation of ruma_common::events::EventContent.
Generates From implementations for event enums.
Derive the From<T: AsRef<str> + Into<Box<str>>> trait for an enum.
Generate methods and trait impl’s for ZST identifier type.
Generating an ‘Incoming’ version of the type this derive macro is used on.
Derive the Ord trait using the AsRef<str> implementation of the type.
Derive the PartialEq trait using the AsRef<str> implementation of the type.
Derive the PartialOrd trait using the AsRef<str> implementation of the type.
Internal helper taking care of the request-specific parts of ruma_api!.
Internal helper taking care of the response-specific parts of ruma_api!.
Derive the Serialize trait using the AsRef<str> implementation of the type.
Shorthand for the derives AsRefStr, FromString, DisplayAsRefStr, SerializeAsRefStr and DeserializeFromCowStr.